//
//  FavoritesManager.m
//  iModern
//
//  Created by Ralf on 5/13/15.
//  Copyright (c) 2015 com.starlooking. All rights reserved.
//

#import "FavoritesManager.h"

@implementation FavoritesManager

- (ResultSet *)addFavorites:(NSString *)articleID
{
    NSDictionary *params = [NSMutableDictionary new];

    [params setValue:[self getSessionID] forKey:@"sessionID"];
    [params setValue:articleID forKey:@"articleID"];

    return [self request:@"favorites/addFavorites" params:params];
}

- (ResultSet *)queryFavoritesBySessionID:(NSInteger)max offset:(NSInteger)offset
{
    NSDictionary *params = [NSMutableDictionary new];

    [params setValue:[self getSessionID] forKey:@"sessionID"];
    [params setValue:[[NSString alloc] initWithFormat:@"%ld", (long) max] forKey:@"max"];
    [params setValue:[[NSString alloc] initWithFormat:@"%ld", (long) offset] forKey:@"offset"];

    return [self request:@"favorites/queryBySessionID" params:params];
}

@end
